package com.easy_buy.configer;

import com.easy_buy.interceptor.MyInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;



@Configuration  // 配置类
@EnableAspectJAutoProxy(proxyTargetClass = true)
public class AopConfiger {

    @Bean // 主动创建对象
    public MyInterceptor getMyInterceptor() {
        return new MyInterceptor();
    }
}



